package com.woniuxy.entity.broker;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;


import com.woniuxy.group.DeleteGroup;
import com.woniuxy.group.InsertGroup;
import com.woniuxy.group.SelectGroup;
import com.woniuxy.group.UpdateGroup;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 经纪人
 * </p>
 *
 * @author booty
 * @since 2021-03-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Broker implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "id不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    private Integer id;

    /**
     * 名称
     */
    @NotNull(message = "name不能为空",groups = InsertGroup.class)
    private String name;

    /**
     * 电话
     */
    @NotNull(message = "phone不能为空",groups = InsertGroup.class)
    private String phone;

    /**
     * 头像
     */

    private String avatar;

    /**
     * 注册时间
     */
    @NotNull(message = "regtime不能为空",groups = InsertGroup.class)
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDateTime regtime;

    /**
     * 星级
     */
    @NotNull(message = "level不能为空",groups = InsertGroup.class)
    private String level;

    /**
     * 门店id
     */
    @NotNull(message = "shopid不能为空",groups = InsertGroup.class)
    private Integer shopid;

    /**
     * 0为正常启用，1为启用
     */
    @NotNull(message = "status不能为空", groups = SelectGroup.class)
    private String status;



}
